package com.company.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

//自定义返回的组件
public class MyImportSelector implements ImportSelector {
    @Override
    /*
    AnnotationMetadata 当前标注@Import注解类的所有注解信息
     */
    public String[] selectImports(AnnotationMetadata annotationMetadata) {

        return new String[]{"com.company.bean.Blue"};
    }
}
